package monster.flight.comm.util;

import java.lang.ref.WeakReference;
import java.util.Map;
import java.util.WeakHashMap;

public class FlightFactory
{
  private Map<String, WeakReference<String>> map;

  public static FlightFactory getInstatnce()
  {
    return FlightHolder.instance;
  }

  public void addFlight(String flight_date) {
    this.map.put(flight_date, new WeakReference<String>(flight_date));
  }
  public Map<String, WeakReference<String>> getFlight() {
    return this.map;
  }

  private FlightFactory()
  {
    init();
  }

  private void init() {
    this.map = new WeakHashMap<String,WeakReference<String>>();
  }

  private static class FlightHolder
  {
    private static FlightFactory instance = new FlightFactory();
  }
}